package com.itheima.service.impl;

import com.itheima.service.Login;

import java.util.Scanner;

public class UserLogin implements Login {
    String userName="user";
    String userWorld="123456";
    @Override
    public boolean userLogin(Scanner scanner) {
        System.out.println("请输入管理员用户名");
        String passName=scanner.next();
        System.out.println("请输入管理员密码");
        String passWorld=scanner.next();

        if (userName.equals(passName)){
            if (userWorld.equals(passWorld)){
                return true;
            }else {
                System.out.println("密码错误");
                return false;
            }
        }else {
            System.out.println("用户名错误");
            return false;
        }

//        return false;
    }
}
